<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>index.html</title>
</head>
<body>
    <div></div>
    <script>
        var div=document.querySelector('div');
        console.log(location.search);
        var params=location.search.substr(1);
        console.log(params);
        var arr=params.split('=');
        console.log(arr);
        div.innerHTML="欢迎"+arr[1]+"来到首页"

    </script>
    
</body>
</html>